<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SpringBoot+Shiro+MyBatisPlus 企业级项目搭建 - 明月工作室</title>
    <link rel="stylesheet" type="text/css" href="./css/normalize.css"/>
    <link rel="stylesheet" type="text/css" href="./css/default.css">
    <link rel="stylesheet" type="text/css" href="./css/styles.css">
    <script src='./js/prefixfree.min.js'></script>
    <script src="./js/jquery.min.js"></script>
</head>
<body>
<div id="logo">
    <h1 class="hogo"><i> MOON INDUSTRIES</i></h1>
</div>
<section class="stark-login">
    <div class="form">
        <div id="fade-box">
            <input type="text" name="username" id="username" placeholder="Username" required>
            <input type="password" id="password" placeholder="Password" required>
            <button id="submit">Log In</button>
        </div>
    </div>
    <div class="hexagons">
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <br>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <br>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>

        <br>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <br>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
        <span>&#x2B22;</span>
    </div>
</section>

<div id="circle1">
    <div id="inner-cirlce1">
        <h2></h2>
    </div>
</div>
<ul>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
</ul>
<header class="htmleaf-header">
    <h1>SpringBoot+Shiro+MyBatisPlus 项目搭建 <span>明月工作室 </span></h1>
    <div class="htmleaf-links">
        <a class="htmleaf-icon icon-htmleaf-home-outline" href="https://www.freebytes.net/it/java/shiro-study-sum.html"
           title="明月工作室"
           target="_blank"><span>明月工作室</span></a>
        <a class="htmleaf-icon icon-htmleaf-arrow-forward-outline"
           href="https://www.freebytes.net/it/java/shiro-study-sum.html"
           title="明月工作室"
           target="_blank"><span> 明月工作室</span></a>
    </div>
    <div>
        <a class="game" target="_blank" href="https://www.freebytes.net/it/java/shiro-study-3.html">Shrio的身份认证原理</a>
        <a class="game" target="_blank" href="https://www.freebytes.net/it/java/sqlitespringbootjpa.html">整合SQLite+SpringBoot+JPA</a>
    </div>
</header>


<script type="application/javascript">
    $(document).ready(function () {

        $("#submit").click(function () {
            var username = $("#username").val();
            var password = $("#password").val();
            console.log(username + "----")
            console.log(password)
            var data = {"username": username, "password": password}
            $.ajax({
                //请求方式
                type: "POST",
                //请求的媒体类型
                contentType: "application/json;charset=UTF-8",
                //请求地址
                url: "/rest/ssmp/login",
                //数据，json字符串
                data: JSON.stringify(data),
                //请求成功
                success: function (result) {
                    console.log(result);
                    if (200 == result.status && 'success' == result.msg) {
                        alert("登录成功")
                        //取消登录成功的跳转
                        //window.location.href = "/game/tanchishe.html"
                    } else {
                        alert("用户名或密码错误")
                    }
                },
                //请求失败，包含具体的错误信息
                error: function (e) {
                    console.log(e.status);
                    console.log(e.responseText);
                    alert("网络问题")
                }
            });
        });
    });
</script>
</body>
</html>